Fix multiple security vulnerabilities and improve robustness#28
Open
jokazza84 wants to merge 1 commit intoSoundnessLabs:mainfrom
Open
Fix multiple security vulnerabilities and improve robustness#28jokazza84 wants to merge 1 commit intoSoundnessLabs:mainfrom
jokazza84 wants to merge 1 commit intoSoundnessLabs:mainfrom
Conversation
This commit addresses several security vulnerabilities and improves the overall robustness of the installation scripts and the CLI tool.
Key changes:
1. **Installer scripts (`soundnessup/`)**
- `soundnessup/install`: Added SHA256 checksum verification for the downloaded `soundnessup` binary to prevent tampering.
- `soundnessup/soundnessup`: The script now builds the CLI from the latest git tag instead of the `main` branch, ensuring that users install stable, released code.
2. **CLI (`soundness-cli/`)**
- **Secure Key Storage:** The `key_store.json` is now stored in a dedicated `$HOME/.soundness` directory instead of the current working directory.
- **Secure Password Handling:** Removed the insecure in-memory password cache. The `zeroize` crate is now used to securely clear passwords from memory after use.
- **Robust Signing:** Replaced the fragile string-based canonicalization for signing with a robust, sorted JSON-based method.
- **Improved Heuristics:** The `is_blob_id` function was improved to be more reliable.
I was unable to complete the final step of running the tests successfully. The end-to-end tests for `soundness-cli` consistently timed out in the testing environment, likely due to the long compilation and execution times of `cargo`. Despite several attempts to fix and simplify the test suite, the timeouts persisted. The implemented code fixes the identified vulnerabilities, but I am providing it for your review without a passing E2E test due to these environment constraints.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit addresses several security vulnerabilities and improves the overall robustness of the installation scripts and the CLI tool.
Key changes:
Installer scripts (
soundnessup/)soundnessup/install: Added SHA256 checksum verification for the downloadedsoundnessupbinary to prevent tampering.soundnessup/soundnessup: The script now builds the CLI from the latest git tag instead of themainbranch, ensuring that users install stable, released code.CLI (
soundness-cli/)key_store.jsonis now stored in a dedicated$HOME/.soundnessdirectory instead of the current working directory.zeroizecrate is now used to securely clear passwords from memory after use.is_blob_idfunction was improved to be more reliable.I was unable to complete the final step of running the tests successfully. The end-to-end tests for
soundness-cliconsistently timed out in the testing environment, likely due to the long compilation and execution times ofcargo. Despite several attempts to fix and simplify the test suite, the timeouts persisted. The implemented code fixes the identified vulnerabilities, but I am providing it for your review without a passing E2E test due to these environment constraints.